<?php
class User_Library extends Database_Library {
	
	public $sql;
	
	public function look_user($user, $password){
		
		$user = $this->mysql_escape($user);
		$password = $this->mysql_escape($password);
		$this->sql = "SELECT * FROM `users` WHERE `password`='$password' AND `username` = '$user'";
		$result = $this->mysql_run($this->sql);
		return $result;
		
	}
	
	public function get_user_data($user, $password){
		$user = $this->mysql_escape($user);
		$password = $this->mysql_escape($password);
		$this->sql = "SELECT * FROM `users` WHERE `password`='$password' AND `username`='$user' LIMIT 1";
		$result = $this->mysql_run($sql);
		$user_data = $this->fetch_array($data);
		return $user_data;
	}
}
